/*
 * @Author: “2Hq1” 274895084@qq.com
 * @Date: 2024-11-27 16:19:36
 * @LastEditors: “2Hq1” 274895084@qq.com
 * @LastEditTime: 2024-11-27 16:43:18
 * @FilePath: \four\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";

Vue.use(VueRouter);

const routes = [
    {
        path: "/",
        name: "home",
        component: HomeView,
    },
    {
        path: "/about",
        name: "about",
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
    },
    {
        path: "/element",
        name: "element",
        component: () => import("../views/ElementView.vue"),

    },
    {
        path: "/login",
        name: "login",
        component: () => import("../views/UserLogin")
    }
];

const router = new VueRouter({

    mode: 'hash',
    routes,
});
export default router;
